/* $Id: test_cpp_memory_limit_exceeded.cpp 12 2010-09-24 13:15:17Z olexiy.palinkash@gmail.com $ */

#include <stdio.h>
#include <vector>

using namespace std;

int main()
{
	vector <int> v;
	for (int k = 1; ; k *= 2)
	{
		v.assign(k * 1024 * 1024 / sizeof(int), 0);
		for (unsigned i = 0; i < v.size(); i += 1000)
			v[i] = k;
	}

	printf("Error. Test should not finish\n");
	return -1;
}

